
<block name="content">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Form</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<link href="/sap/demo.css" rel="stylesheet" type="text/css" />
    <script src="/sap/scripts/boot.js" type="text/javascript"></script>
</head>
<style>

td{
      margin-top:10px;     
    
}
</style>
<body>
    <div id="form1" >
        <!--<input name="id" class="mini-hidden"  value="{$data.item_id}"/>-->
        <table cellspacing='10' style="width: 700px; border-spacing:0px 10px;" >

			 <tr>
                <td>
                    <label for="textbox1$text">订单号：</label>
                </td>
                <td>
                    <input id="order_code"  name="order_code" class="mini-textbox" required  width='250px' value ="{$order_info.order_code}"/>
                    <!--(建议命名规则:品牌+物料+型号)-->
                </td>
            </tr>

          
            
           
            

        
            
           
           
       
              <tr>
                <td>
                    <label for="textbox1$text">反馈类型：</label>
                </td>
                <td>
                <select name='status' id="status" class="form-control" >
                     <option value=""> 请选择要反馈的状态</option>
                        <!--<option <if condition="$order_info.status eq 0">selected</if> value="0">订单挂起（0）</option>-->
						<option <if condition="$order_info.status eq 65">selected</if> value="65"> 退货失败（65）</option>
						<!--<option <if condition="$order_info.status eq 30">selected</if> value="30">已发货取消（30）</option>
                        <option <if condition="$order_info.status eq 40">selected</if> value="40">已签收（40）</option>
						<option <if condition="$order_info.status eq 70">selected</if> value="70">已退回（70）</option>-->
                </select>
                    
                </td>
            </tr>
            
            
             <tr>
                <td>
                    <label for="textbox1$text">备注：</label>
                </td>
                <td>
                    <input id="remark"  name="remark" class="mini-textbox" required  width='250px' value ="{$order_info.remark}"/>
                    <!--(建议命名规则:品牌+物料+型号)-->
                </td>
            </tr>
            
            
			<tr>
                <td>
                    
                </td>
                <td>
                    <input id="id"  name="id" type="hidden" value ="{$order_info.id}"/>
                    <a class='mini-button' onClick="submitForm(1)" >保存</a>
                    
                    <!--CloseWindow()-->
                                                          
                    
                </td>
            </tr>
            
        </table>
    </div>
    <script type="text/javascript">
        mini.parse();
        function submitForm(tag) {
            //提交表单数据
            var form = new mini.Form("#form1"); 
            form.validate();
            if (form.isValid() == false) return;

            //save begin
//            if ($(".uploader .tbody").length > 0)  {
//            }
//            else {
//                mini.alert("必须上传相关附件！");
//                return;
//            }

            //确认提示
            mini.confirm("确定添加？", "确定？",
                function (action) {
                    if (action == "ok") {
                        //var data = form.getData();      //获取表单多个控件的数据
						  var  myselect=document.getElementById("status");
                          var index=myselect.selectedIndex ;             // selectedIndex代表的是你所选中项的index
						  var status=myselect.options[index].value;
						  var order_code = mini.get('order_code').getValue();
						  var remark = mini.get('remark').getValue();
						 
						   var id = document.getElementById("id").value;
					
						  
                        $.ajax({
							url:"/index.php?m=&c=Boc365&a=addingExpOrder",
                            type: "post",
                            data: {order_code: order_code,status: status,remark: remark,id:id},
                            dataType: 'json',
                            success: function (data) {
                            mini.alert(data.msg);
							//location.href="/index.php?m=&c=Boc365&a=handorder";
                                //CloseWindow();
                            }
                        });

                    } else {
                    }
                });

           // save end

        }
     
		
   function CloseWindow(action) {

       if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
       else window.close();
	   location.href=document.referrer;
    }

    </script>
   
</body>
</html>

</block>
<block name="js">
	<script type="text/javascript">
		function save() {
			sendForm("form_data", "{:U('save')}", "{:U('index')}");
		}
	</script>
</block>